Skip to main content

Automatic Traffic Check-in Script


  • Google Apps Script / Cloud Functions
note
  • A Google account is required. Create a Google Apps Script in Google Drive.

Getting Started


Google Paste the following script code here

Click to expand code
  function dailySign() {
const loginUrl = 'https://v2.ixlmo.net/api/v1/passport/auth/login';
const signUrl = 'https://v2.ixlmo.net/api/v1/user/DailySign';

const loginPayload = {
email: 'test', // Replace with your account email
password: 'test', // Replace with your account password
captchaData: null
};

try {

const loginResponse = UrlFetchApp.fetch(loginUrl, {
method: 'post',
contentType: 'application/json',
payload: JSON.stringify(loginPayload),
muteHttpExceptions: true
});

const loginData = JSON.parse(loginResponse.getContentText());

if (loginResponse.getResponseCode() !== 200) {
throw new Error('登录失败: ' + (loginData.message || loginResponse.getContentText()));
}

const token = loginData.data.auth_data;


const signResponse = UrlFetchApp.fetch(signUrl, {
method: 'get',
headers: {
'Authorization': token
},
muteHttpExceptions: true
});

const signData = JSON.parse(signResponse.getContentText());

if (signResponse.getResponseCode() !== 200) {
throw new Error('签到失败: ' + (signData.message || signResponse.getContentText()));
}

Logger.log('签到成功:' + signData.message);
} catch (e) {
Logger.log('错误: ' + e.message);
}
}

Fill in the Relevant Fields

Google

The basic configuration is now complete. To run the script, click Debug, select dailySign from the dropdown, click Debug, and authorize website access.

Google

Click to review permissions:

Google
Google
Google

The project should now be running, and you can see execution logs in the debug console:

Google


Deployment


Google Apps Script does not require deployment; here we need to add a time-driven trigger:

Google

  • Function to run: dailySign
  • Event source: Time-driven
  • Type of time-based trigger: Daily timer
  • Time interval: Between 1 PM and 2 PM

Google

Done!